package com.atguigu.jxc.service.impl;

import com.atguigu.jxc.dao.ReturnListDao;
import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.domain.SuccessCode;
import com.atguigu.jxc.entity.ReturnList;
import com.atguigu.jxc.service.ReturnListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * description
 *
 * @author SZ
 * @date 2022/9/25/20:07
 */
@Service
public class ReturnListServiceImpl implements ReturnListService {
    @Autowired
    private ReturnListDao returnListDao;
    @Override
    public void insertReturnList(ReturnList returnList) {
        returnListDao.insertReturnList(returnList);
    }

    @Override
    public List<ReturnList> getList(String returnNumber, Integer supplierId, Integer state, String sTime, String eTime) {
        return returnListDao.getList(returnNumber,supplierId,state,sTime,eTime);
    }

    @Override
    public ServiceVO deleteById(Integer returnListId) {
        if (returnListId!=null){
            returnListDao.deleteById(returnListId);
        }
        return new ServiceVO (SuccessCode.SUCCESS_CODE,SuccessCode.SUCCESS_MESS);
    }
}
